<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>buffers_adaptor</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="Chapter 1. Boost.Beast">
<link rel="up" href="../ref.html" title="This Page Intentionally Left Blank 2/2">
<link rel="prev" href="boost__beast__buffered_read_stream/async_write_some.html" title="buffered_read_stream::async_write_some">
<link rel="next" href="boost__beast__buffers_adaptor/value_type.html" title="buffers_adaptor::value_type">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="boost__beast__buffered_read_stream/async_write_some.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="boost__beast__buffers_adaptor/value_type.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="beast.ref.boost__beast__buffers_adaptor"></a><a class="link" href="boost__beast__buffers_adaptor.html" title="buffers_adaptor">buffers_adaptor</a>
</h4></div></div></div>
<p>
        Adapts a <span class="emphasis"><em>MutableBufferSequence</em></span> into a <span class="emphasis"><em>DynamicBuffer</em></span>.
      </p>
<h5>
<a name="beast.ref.boost__beast__buffers_adaptor.h0"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__buffers_adaptor.synopsis"></a></span><a class="link" href="boost__beast__buffers_adaptor.html#beast.ref.boost__beast__buffers_adaptor.synopsis">Synopsis</a>
      </h5>
<p>
        Defined in header <code class="literal">&lt;<a href="../../../../../../boost/beast/core/buffers_adaptor.hpp" target="_top">boost/beast/core/buffers_adaptor.hpp</a>&gt;</code>
      </p>
<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span>
    <span class="keyword">class</span> <a href="../../../../../../doc/html/boost_asio/reference/MutableBufferSequence.html" target="_top"><span class="emphasis"><em>MutableBufferSequence</em></span></a><span class="special">&gt;</span>
<span class="keyword">class</span> <span class="identifier">buffers_adaptor</span>
</pre>
<h5>
<a name="beast.ref.boost__beast__buffers_adaptor.h1"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__buffers_adaptor.types"></a></span><a class="link" href="boost__beast__buffers_adaptor.html#beast.ref.boost__beast__buffers_adaptor.types">Types</a>
      </h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Name
                </p>
              </th>
<th>
                <p>
                  Description
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__buffers_adaptor/const_buffers_type.html" title="buffers_adaptor::const_buffers_type">const_buffers_type</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  The ConstBufferSequence used to represent the readable bytes.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__buffers_adaptor/mutable_buffers_type.html" title="buffers_adaptor::mutable_buffers_type">mutable_buffers_type</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  The MutableBufferSequence used to represent the writable bytes.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__buffers_adaptor/value_type.html" title="buffers_adaptor::value_type">value_type</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  The type of the underlying mutable buffer sequence.
                </p>
              </td>
</tr>
</tbody>
</table></div>
<h5>
<a name="beast.ref.boost__beast__buffers_adaptor.h2"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__buffers_adaptor.member_functions"></a></span><a class="link" href="boost__beast__buffers_adaptor.html#beast.ref.boost__beast__buffers_adaptor.member_functions">Member
        Functions</a>
      </h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Name
                </p>
              </th>
<th>
                <p>
                  Description
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__buffers_adaptor/buffers_adaptor.html" title="buffers_adaptor::buffers_adaptor">buffers_adaptor</a> <span class="silver">[constructor]</span></strong></span>
                </p>
              </td>
<td>
                <p>
                  Construct a buffers adaptor. <br> <span class="silver">—</span><br>
                  Constructor. <br> <span class="silver">—</span><br> Copy
                  Constructor.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__buffers_adaptor/capacity.html" title="buffers_adaptor::capacity">capacity</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Return the maximum number of bytes, both readable and writable,
                  that can be held without requiring an allocation.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__buffers_adaptor/cdata.html" title="buffers_adaptor::cdata">cdata</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Returns a constant buffer sequence representing the readable bytes.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__buffers_adaptor/commit.html" title="buffers_adaptor::commit">commit</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Append writable bytes to the readable bytes.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__buffers_adaptor/consume.html" title="buffers_adaptor::consume">consume</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Remove bytes from beginning of the readable bytes.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__buffers_adaptor/data.html" title="buffers_adaptor::data">data</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Returns a constant buffer sequence representing the readable bytes.
                  <br> <span class="silver">—</span><br> Returns a mutable
                  buffer sequence representing the readable bytes.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__buffers_adaptor/max_size.html" title="buffers_adaptor::max_size">max_size</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Return the maximum number of bytes, both readable and writable,
                  that can ever be held.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__buffers_adaptor/operator_eq_.html" title="buffers_adaptor::operator=">operator=</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Copy Assignment.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__buffers_adaptor/prepare.html" title="buffers_adaptor::prepare">prepare</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Returns a mutable buffer sequence representing writable bytes.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__buffers_adaptor/size.html" title="buffers_adaptor::size">size</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Returns the number of readable bytes.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__buffers_adaptor/value.html" title="buffers_adaptor::value">value</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Returns the original mutable buffer sequence.
                </p>
              </td>
</tr>
</tbody>
</table></div>
<h5>
<a name="beast.ref.boost__beast__buffers_adaptor.h3"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__buffers_adaptor.description"></a></span><a class="link" href="boost__beast__buffers_adaptor.html#beast.ref.boost__beast__buffers_adaptor.description">Description</a>
      </h5>
<p>
        This class wraps a <span class="emphasis"><em>MutableBufferSequence</em></span> to meet the
        requirements of <span class="emphasis"><em>DynamicBuffer</em></span>. Upon construction the
        input and output sequences are empty. A copy of the mutable buffer sequence
        object is stored; however, ownership of the underlying memory is not transferred.
        The caller is responsible for making sure that referenced memory remains
        valid for the duration of any operations. The size of the mutable buffer
        sequence determines the maximum number of bytes which may be prepared and
        committed.
      </p>
<h5>
<a name="beast.ref.boost__beast__buffers_adaptor.h4"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__buffers_adaptor.template_parameters"></a></span><a class="link" href="boost__beast__buffers_adaptor.html#beast.ref.boost__beast__buffers_adaptor.template_parameters">Template
        Parameters</a>
      </h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Type
                </p>
              </th>
<th>
                <p>
                  Description
                </p>
              </th>
</tr></thead>
<tbody><tr>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">MutableBufferSequence</span></code>
                </p>
              </td>
<td>
                <p>
                  The type of mutable buffer sequence to adapt.
                </p>
              </td>
</tr></tbody>
</table></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2016-2019 Vinnie
      Falco<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="boost__beast__buffered_read_stream/async_write_some.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="boost__beast__buffers_adaptor/value_type.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
